import Vue from 'vue'
// import i18n from '@/system/locale'

export default class App {
  constructor (params) {
    this.init(params)
  }

  init (params) {
    const { store, App } = params
    this.store = store
    this.initStore()
    this.initLocale()
    this.mountApp(App)
  }

  /*
   * 初始化store
  */
  initStore () {}

  /*
   * 初始化locale
  */
  initLocale () {
    // this.i18n = i18n
  }

  /*
   * 挂载Vue应用
  */
  mountApp (App) {
    new Vue({
      store: this.store,
      // i18n: this.i18n,
      ...App
    }).$mount()
  }
}